﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xiaov.SmartWeb.Model.Statistical.Tags
{
    public class DataGrid_ToolBar_Delete : ITag
    {
        //0新增行,1新增子节点,2删除行,3保存,4清空,5表内计算,6表间提取,7分级汇总,8继承

        public string Value(BaseReport BR)
        {
            if (BR.ViewUser.Super)
                return "false";
            else
            {
                int pmIndex = 2;
                string rb = "true";
                if (BR.Permissions != null)
                {
                    if (BR.Permissions[pmIndex].Allow && !BR.ReportState.HasLocked)
                        rb = "false";
                    else
                        rb = "true";
                }
                return rb;
            }
        }
    }
}
